package com.aode.music.viewmodel;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.MutableLiveData;

import com.aode.common.bean.response.Music;
import com.aode.downloadmusic.repository.Repository;
import com.aode.music.repository.LocalRepository;

import java.util.List;

public class DownloadViewModel extends AndroidViewModel {
    private LocalRepository repository;
    public DownloadViewModel(@NonNull Application application) {
        super(application);
        repository = new LocalRepository(application);
    }
    public void getMusic(){
        repository.loadLocalMusicData();
    }
    public MutableLiveData<List<Music>> getMusicLiveData(){
        return repository.getMusicMutableLiveData();
    }
}
